/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import request from '@/utils/request';

//微快递寄件黑名单
export async function getBlackList(params: any) {
  return request('/regiment/Blacklist/list', {
    method: 'POST',
    data: params,
  });
}

export async function editBlack(params: any) {
  return request('/regiment/Blacklist/edit', {
    method: 'POST',
    data: params,
  });
}

export async function getBrandList(params: any) {
  return request('/regiment/Blacklist/getBrandList', {
    method: 'POST',
    data: params,
  }).then((res) => {
    const { data } = res;
    const brandData = Object.keys(data).map((item) => ({
      label: data[item],
      value: item,
    }));
    return brandData || [];
  });
}
